module.exports = app => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;
  const RoleSchema = new Schema({
    title: {
      type: String,
      require: true // 必填项
    },
    description: {
      type: String,
      require: true
    },
    type: {
      type: String,
      require: true
    },
    canDelete: {
      type: Boolean,
      default: true
    },
    count: {
      type: Number,
      default: 0
    },
    isFavorite: {
      type: Boolean,
      default: false
    }
  });
  return mongoose.model("Agent", RoleSchema, "agent");
};
